//ES6+ 新特性
const a = 1
    //a=2;
    //console.log(a);   //const 无法重新赋值
let b = 1;
b=3;
    //console.log(b)   //let 重新赋值

//数据类型

const deadLine=new Date("2025-10-01 00:00");
let startTime=new Date();

const countTime = function(){

    let countTrigger = 0;
    
    let day=0;
    let hour=0;
    let min=0;
    let sec=0;
    
    function upDate(){
        countTrigger++;
        let now =new Date();
        let RemainTime=deadLine-now;
        sec=RemainTime / 1000 % 60;
        min=RemainTime / 1000 / 60 % 60;
        hour=RemainTime / 1000 /60/60 %24;
        day = RemainTime /1000 /60 /60 /24 % 365;
        let delay=(startTime+(1000*countTrigger))-now
        setTimeout(()=>{
            console.log(`${day}天-${hour}小时-${min}分钟-${sec}秒`);
            console.log(delay);
            countTime();
        },1000)
    }

    return upDate();
}

//countTime()
